package com.lingyu.jsjx.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 学生成绩对象 jsjx_student_score
 *
 * @author ruoyi
 * @date 2025-07-31
 */
@TableName("jsjx_student_score")
public class StudentScore extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 成绩id（主键）
     */
    @TableId(value = "score_id", type = IdType.AUTO)
    private Long scoreId;

    /**
     * 所属学院id
     */
    @NotNull(message = "所属学院不正确")
    private Long collageId;

    /**
     * 所属学院name
     */
    @Excel(name = "所属学院")
    private String collageName;

    /**
     * 班级名称
     */
    @NotNull(message = "班级不正确")
    private Long classId;

    /** 所属专业id */
    @NotNull(message = "所属专业不正确")
    private Long majorId;

    /** 所属专业name */
    @Excel(name = "所属专业")
    private String majorName;

    /**
     * 班级名称
     */
    @Excel(name = "班级名称")
    private String className;

    /**
     * 教师id
     */
    @NotNull(message = "教师不正确")
    private Long teacherId;

    /**
     * 授课教师
     */
    @Excel(name = "授课教师")
    private String teacherName;

    /**
     * 成绩类型
     */
    @Excel(name = "成绩类型", readConverterExp = "77=期中考试,78=期末考试,79=项目考核,80=期中实操,81=期末理论,82=实践教学")
    @NotNull(message = "成绩类型不正确")
    private Long scoreTypeId;

    /**
     * 成绩类型（期中/期末等）
     */
    private String scoreTypeName;

    /**
     * 学年
     */
    @Excel(name = "学年")
    @NotBlank(message = "学年不正确")
    private String academicYear;

    /**
     * 考试批次
     */
    @Excel(name = "考试批次")
    @NotBlank(message = "考试批次不正确")
    private String examBatch;

    /**
     * 考试时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "考试时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "考试时间不正确")
    private Date examDate;

    @TableField(exist = false)
    private List<Student> studentList;

    /**
     * 备注信息
     */
    @Excel(name = "备注信息")
    private String remarks;

    public void setScoreId(Long scoreId) {
        this.scoreId = scoreId;
    }

    public Long getScoreId() {
        return scoreId;
    }

    public void setCollageId(Long collageId) {
        this.collageId = collageId;
    }

    public Long getCollageId() {
        return collageId;
    }

    public void setCollageName(String collageName) {
        this.collageName = collageName;
    }

    public String getCollageName() {
        return collageName;
    }

    public void setClassId(Long classId) {
        this.classId = classId;
    }

    public Long getClassId() {
        return classId;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getClassName() {
        return className;
    }

    public void setTeacherId(Long teacherId) {
        this.teacherId = teacherId;
    }

    public Long getTeacherId() {
        return teacherId;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public Long getScoreTypeId() {
        return scoreTypeId;
    }

    public void setScoreTypeId(Long scoreTypeId) {
        this.scoreTypeId = scoreTypeId;
    }

    public void setScoreTypeName(String scoreTypeName) {
        this.scoreTypeName = scoreTypeName;
    }

    public String getScoreTypeName() {
        return scoreTypeName;
    }

    public void setAcademicYear(String academicYear) {
        this.academicYear = academicYear;
    }

    public String getAcademicYear() {
        return academicYear;
    }

    public void setExamBatch(String examBatch) {
        this.examBatch = examBatch;
    }

    public String getExamBatch() {
        return examBatch;
    }

    public void setExamDate(Date examDate) {
        this.examDate = examDate;
    }

    public Date getExamDate() {
        return examDate;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getRemarks() {
        return remarks;
    }

    public List<Student> getStudentList() {
        return studentList;
    }

    public void setStudentList(List<Student> studentList) {
        this.studentList = studentList;
    }

    public Long getMajorId() {
        return majorId;
    }

    public void setMajorId(Long majorId) {
        this.majorId = majorId;
    }

    public String getMajorName() {
        return majorName;
    }

    public void setMajorName(String majorName) {
        this.majorName = majorName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("scoreId", getScoreId())
                .append("collageId", getCollageId())
                .append("collageName", getCollageName())
                .append("classId", getClassId())
                .append("className", getClassName())
                .append("teacherId", getTeacherId())
                .append("teacherName", getTeacherName())
                .append("scoreTypeName", getScoreTypeName())
                .append("academicYear", getAcademicYear())
                .append("examBatch", getExamBatch())
                .append("examDate", getExamDate())
                .append("remarks", getRemarks())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
